package com.etcn.modules.statical.base.controller;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.ResponseBody;

import com.etcn.common.annotation.Manage;
import com.etcn.common.controller.BaseController;
import com.etcn.modules.statical.base.service.IBaseDictionaryService;

/**
 * 字典controller
 * @author guozc
 * @date: 2018-01-12 13:38:53
 */
@Controller
@RequestMapping("/v1/base")
public class BaseDictionaryController extends BaseController {

	@Autowired
    private IBaseDictionaryService baseDictionaryService;

     /**
     * 根据id查询字典
     */
    @Manage
    @RequestMapping(value = "dictionarys", method = RequestMethod.GET)
    public @ResponseBody Object dictionarys(String type) throws Exception{
    	return baseDictionaryService.getByDicType(type);
    }
    
}